﻿@{
    ViewBag.Title = "AddSite";
    ViewBag.MenuIndex = 2;
    List<Xwork.SEO.SearchEngine> engines = (List<Xwork.SEO.SearchEngine>)ViewData["engines"];
}
@model Xwork.SEO.SeoKeyword
@Scripts.Render("~/bundles/jqueryui")
@Styles.Render("~/Content/themes/base/css")
@if (!User.IsAuthenticated)
{
<div class="ny">
    <div class="ny_kb9"></div>
    <div class="ny_content">
        @Html.Action("UserInfoLeft","member")
        <div class="ny_content_right" style="height:593px;">
        	<div class="ny_right_1">
            	<div class="ny_right_1_1">添加关键字</div>
            </div>
            <div class="ny_right_2">         
                <div class="td06">
                    <div class="left_content">
                        <h4><font color="#ff6600">*</font> 站点：</h4>
                        <h4><font color="#ff6600">*</font> 关键字：</h4>
                        <h4><font color="#ff6600">*</font> 搜索引擎：</h4>
                        <h4 style="height:60px;">&nbsp;</h4>
                    </div>
                    <div class="right_content">
                        @using (Ajax.BeginForm("addkeyword", new AjaxOptions { OnSuccess="success" }))
                        {
                         @Html.ValidationSummary(true)
                            @Html.HiddenFor(p => p.ID)
                        <ul>
                            <li>@Html.DropDownList("SeoSiteID")</li>
                            <li>@Html.EditorFor(p => p.KeywordName)                    @Html.ValidationMessageFor(p => p.KeywordName)    </li>
                            <li>
                                @{var index = 0;}
                                @foreach (var item in engines)
                                {
                                    <label><input type="checkbox" name="SearchEngines[@index].ID" value="@item.ID" />@item.Name</label>
                                    index++;
                                }
                            </li>
                            <li class="button02">   <input type="submit" name="submit" value="">                            </li>
                        </ul>
                        }  
                    </div>
                </div>   
            </div>
        </div>
    </div>
</div>
}
else
{
    <div id="info">
        您的账户未审核，请先完善公司资料以便我们审核！
        <a style="color:#eb7a14;" href="@Url.Action("info", "member")">完善资料</a>
    </div>
    <div>
        <script type="text/javascript">
            $("#info").dialog({title:"系统提示"});
        </script>

    </div>
}
<script type="text/javascript">
    function success(d) {
        $.handleAjaxCallback(d);
    }
</script>